package com.sunny.region.service.impl;

import com.sunny.region.dao.RegionsMapper;
import com.sunny.region.model.Regions;
import com.sunny.region.service.RegionsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by tongchengke on 2016/8/9.
 */

@Service
public class RegionsServiceImpl implements RegionsService {

    @Resource
    private RegionsMapper regionsDao;

    public int deleteByPrimaryKey(Long id) {
        return regionsDao.deleteByPrimaryKey(id);
    }

    public int insert(Regions record) {
        return regionsDao.insert(record);
    }

    public int insertSelective(Regions record) {
        return regionsDao.insertSelective(record);
    }

    public Regions selectByPrimaryKey(Long id) {
        return regionsDao.selectByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(Regions record) {
        return regionsDao.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKeyWithBLOBs(Regions record) {
        return regionsDao.updateByPrimaryKeyWithBLOBs(record);
    }

    public int updateByPrimaryKey(Regions record) {
        return regionsDao.updateByPrimaryKey(record);
    }

    @Override
    public List<Regions> selectRegionsByPid(Long pid) {
        return regionsDao.selectRegionsByPid(pid);
    }
}
